<?php
/**注意此文档为UTF-8的编码.
 * Created on 2010-5-29
 *
 * @author EXT <isrn@qq.com>
 *
 */
include ('../../includes/global.php');
include ('../global.php');
include ("../power.php");

 	$node=$_POST['node'];
 		$temp=Dgd(array(
		  'db'=>'d_sevenel',
		  'cd'=>"is_expand = 0",
		  'tn'=>"tree"
		 ));
		foreach ($temp as $key=>$value){
    	$value['leaf'] = $value['leaf']==0?false:true;
    	$cls = $value['leaf']==0?'folder':'file';
    	if($value['url']==''){
    		$url = 'form_render.php?id='.$value['id'];
    	}else{
    		$url = $value['url'];
    	}
		$trees[$value['parentid']][] = array ('id'=>$value['id'], 'text'=>$value['title'], 'leaf'=>$value['leaf'],'cls'=>$cls ,'model'=>'user','action'=>$url);
    	}
		echo json_encode($trees[$node]);

?>
